import { success, fail } from '../helper';
export default [
  {
    url: '/api/vxeTable/list',
    method: 'get',
    timeout: 100 + Math.floor(Math.random() * 1000),
    response: (req: { query: { page?: number; size?: number } }) => {
      const query = req.query;
      if (!query.page || !query.size) {
        return fail('page和size必填');
      }
      if (query.page < 1) {
        return fail('page必须大于0');
      }
      if (query.size < 1) {
        return fail('size必须大于0');
      }
      return success({
        page: query.page,
        size: query.size,
        count: 1000,
        list: [
          {
            id: +(query.page + '10001'),
            name: 'Test1',
            nickname: 'T1',
            role: 'Develop',
            sex: '0',
            sex1: [],
            state: '',
            region: [],
            age: 28,
            date: '',
            date1: '',
            date2: '',
            date3: '',
            date4: [],
            date5: '',
            date7: '',
            color1: '',
            tree1: '',
            tree2: [],
            rate: 5,
            rate1: 59,
            flag: false,
            address: 'Shenzhen',
          },
          {
            id: +(query.page + 10002),
            name: 'Test2',
            nickname: 'T2',
            role: 'Test',
            sex: '1',
            sex1: [],
            state: '',
            region: [],
            age: 22,
            date: '',
            date1: '',
            date2: '',
            date3: '',
            date4: [],
            date5: '',
            date7: '',
            color1: '',
            tree1: '',
            tree2: [],
            rate: 2,
            rate1: 22,
            flag: false,
            address: 'Guangzhou',
          },
          {
            id: +(query.page + 10003),
            name: 'Test3',
            nickname: 'T3',
            role: 'PM',
            sex: '0',
            sex1: [],
            state: '',
            region: [],
            age: 32,
            date: '',
            date1: '',
            date2: '',
            date3: '',
            date4: [],
            date5: '',
            date7: '',
            color1: '',
            tree1: '',
            tree2: [],
            rate: 3,
            rate1: 12,
            flag: false,
            address: 'Shanghai',
          },
          {
            id: +(query.page + 10004),
            name: 'Test4',
            nickname: 'T4',
            role: 'Designer',
            sex: '0',
            sex1: ['1', '0'],
            state: '',
            region: [],
            age: 23,
            date: '',
            date1: '',
            date2: '',
            date3: '',
            date4: [],
            date5: '',
            color1: '',
            tree1: '',
            tree2: [],
            date7: '',
            rate: 33,
            rate1: 4,
            flag: true,
            address: 'Shenzhen',
          },
          {
            id: +(query.page + 10005),
            name: 'Test5',
            nickname: 'T5',
            role: 'Develop',
            sex: '0',
            sex1: ['1', '0'],
            state: '',
            region: [],
            age: 30,
            date: '',
            date1: '',
            date2: '',
            date3: '',
            date4: [],
            date5: '',
            color1: '',
            tree1: '',
            tree2: [],
            date7: '',
            rate: 0,
            rate1: 15,
            flag: true,
            address: 'Shanghai',
          },
          {
            id: +(query.page + 10006),
            name: 'Test6',
            nickname: 'T6',
            role: 'Designer',
            sex: '0',
            sex1: [],
            state: '',
            region: [],
            age: 21,
            date: '',
            date1: '',
            date2: '',
            date3: '',
            date4: [],
            date5: '',
            date7: '',
            color1: '',
            tree1: '',
            tree2: [],
            rate: 3,
            rate1: 73,
            flag: false,
            address: 'Shenzhen',
          },
          {
            id: +(query.page + 10007),
            name: 'Test7',
            nickname: 'T7',
            role: 'Test',
            sex: '1',
            sex1: ['1'],
            state: '',
            region: [],
            age: 29,
            date: '',
            date1: '',
            date2: '',
            date3: '',
            date4: [],
            date5: '',
            date7: '',
            color1: '',
            tree1: '',
            tree2: [],
            rate: 0,
            rate1: 0,
            flag: true,
            address: 'Guangzhou',
          },
          {
            id: +(query.page + 10008),
            name: 'Test8',
            nickname: 'T8',
            role: 'Develop',
            sex: '1',
            sex1: [],
            state: '',
            region: [],
            age: 35,
            date: '',
            date1: '',
            date2: '',
            date3: '',
            date4: [],
            date5: '',
            date7: '',
            color1: '',
            tree1: '',
            tree2: [],
            rate: 2,
            rate1: 14,
            flag: false,
            address: 'Shenzhen',
          },
          {
            id: +(query.page + 10009),
            name: 'Test9',
            nickname: 'T9',
            role: 'Test',
            sex: '1',
            sex1: ['0'],
            state: '',
            region: [],
            age: 24,
            date: '',
            date1: '',
            date2: '',
            date3: '',
            date4: [],
            date5: '',
            date7: '',
            color1: '',
            tree1: '',
            tree2: [],
            rate: 3,
            rate1: 52,
            flag: false,
            address: 'Shenzhen',
          },
          {
            id: +(query.page + 100010),
            name: 'Test10',
            nickname: 'T10',
            role: 'Develop',
            sex: '1',
            sex1: [],
            state: '',
            region: [],
            age: 20,
            date: '',
            date1: '',
            date2: '',
            date3: '',
            date4: [],
            date5: '',
            date7: '',
            color1: '',
            tree1: '',
            tree2: [],
            rate: 4,
            rate1: 83,
            flag: false,
            address: 'Guangzhou',
          },
        ],
      });
    },
  },
];
